add_library(ben_gui SHARED
                       ${CMAKE_CURRENT_SOURCE_DIR}/image/qimageconversion/tst_qimageconversion.cpp
                       ${CMAKE_CURRENT_SOURCE_DIR}/image/qimagereader/tst_qimagereader.cpp
                       ${CMAKE_CURRENT_SOURCE_DIR}/image/qimagescale/tst_qimagescale.cpp
                       ${CMAKE_CURRENT_SOURCE_DIR}/image/qpixmap/tst_qpixmap.cpp
                       ${CMAKE_CURRENT_SOURCE_DIR}/image/qpixmapcache/tst_qpixmapcache.cpp
                       ${CMAKE_CURRENT_SOURCE_DIR}/kernel/qguimetatype/tst_qguimetatype.cpp
                       ${CMAKE_CURRENT_SOURCE_DIR}/kernel/qguivariant/tst_qguivariant.cpp
                       ${CMAKE_CURRENT_SOURCE_DIR}/math3d/qmatrix4x4/tst_qmatrix4x4.cpp
                       ${CMAKE_CURRENT_SOURCE_DIR}/math3d/qquaternion/tst_qquaternion.cpp
                       ${CMAKE_CURRENT_SOURCE_DIR}/painting/drawtexture/tst_drawtexture.cpp
                       ${CMAKE_CURRENT_SOURCE_DIR}/painting/lancebench/tst_lancebench.cpp
                       ${CMAKE_CURRENT_SOURCE_DIR}/painting/qcolor/tst_qcolor.cpp
                       ${CMAKE_CURRENT_SOURCE_DIR}/painting/qpainter/tst_qpainter.cpp
                       ${CMAKE_CURRENT_SOURCE_DIR}/painting/qtbench/tst_qtbench.cpp
                       ${CMAKE_CURRENT_SOURCE_DIR}/painting/qtransform/tst_qtransform.cpp
                       ${CMAKE_CURRENT_SOURCE_DIR}/../../auto/other/lancelot/paintcommands.cpp
)

find_package(QT NAMES Qt5 Qt6 REQUIRED COMPONENTS Core)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Test Gui Widgets)
target_link_libraries(ben_gui PRIVATE Qt${QT_VERSION_MAJOR}::Core
                                         Qt${QT_VERSION_MAJOR}::CorePrivate
                                         Qt${QT_VERSION_MAJOR}::Test
                                         Qt${QT_VERSION_MAJOR}::Gui
                                         Qt${QT_VERSION_MAJOR}::GuiPrivate
                                         Qt${QT_VERSION_MAJOR}::WidgetsPrivate)